<?php

namespace App\Admin\Table;

use App\Admin\Repositories\SchoolWithdrawFund;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;
use Dcat\Admin\Models\Administrator;

class SchoolWithdrawFundsTable extends LazyRenderable
{
    public function grid(): Grid
    {
        return Grid::make(new SchoolWithdrawFund(), function (Grid $grid) {
            $schoolId = $this->payload['id'];
            $grid->model()->where('school_id', $schoolId);
            $grid->column('id', 'ID')->sortable();
            $grid->column('amount', '提现金额');
            $grid->column('created_at');
            $grid->column('updated_at');
            $grid->disableActions();
        });
    }
}
